<?php

define('SMARTY_DIR','./smarty/');
require_once SMARTY_DIR . 'Smarty.class.php';

$smarty = new Smarty;
$smarty->compile_check = true;
$smarty->debugging = false;
$smarty->plugins_dir[] = './cf/components/';
$smarty->plugins_dir[] = './components/';

set_include_path( 
	get_include_path() . PATH_SEPARATOR .
	dirname(__FILE__) . PATH_SEPARATOR .
	dirname(__FILE__).'/cf'
);

require_once 'cf/init.inc';
require_once 'cf/params.inc';
require_once 'cf/controls.inc';

date_default_timezone_set('Europe/Moscow');

function show($template, $title='', $crumbs=array())
{
	global $smarty;

	$smarty->assign('title',$title);
	$smarty->assign('crumbs',$crumbs);
	$smarty->assign('tpl', "$template.tpl");

	$smarty->display('main.tpl');
}

$smarty->assign('leftMenu', Menu::getItems('left'));
$smarty->assign('leftMenu2', Menu::getItems('left2'));

define('ARTICLES_PAGE_ID', 7);

$descr = null;
$smarty->assignByref('descr', $descr);

$keywords = null;
$smarty->assignByref('keywords', $keywords);

$search = null;
$smarty->assignByref('search', $search);
?>